﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="escola.aspx.cs" Inherits="geoSchools.Conta.escola" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script>
    <script src="../Util/Scripts/Maps.js" type="text/javascript"></script>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
  
      <script type="text/javascript">
          $(document).ready(function () {
              $("#tabs").tabs();
          });
      </script>
      <script type="text/javascript">

              function addTelefone() {
                  var dlg = $("#pnlTelefone").dialog({
                      height: 220, width: 530, modal: true, draggable: true, resizable: false,
                      title: 'Adicionar telefone',
                      close: function () { __doPostBack('__pnlTelefonePostback', '0'); }
                  });
                  return false;

              }
       </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <fieldset id="fieldset">
        <legend>Cadastro da Instituição</legend>
        <fieldset class="infLeft">
            <legend>Informações da Instituição</legend>
            <div>
                <asp:Label ID="lblEmail" runat="server" Text="Email:"></asp:Label>
                <asp:TextBox ID="txtEmail" runat="server" placeholder="exemplo@site.com"></asp:TextBox>
                <br />
                <asp:Label ID="lblSenha" runat="server" Text="Senha:"></asp:Label>
                <asp:TextBox ID="txtSenha" runat="server" placeholder="Digite uma senha"></asp:TextBox>
                <br />
                <asp:Label ID="lblSenhaConfirmar" runat="server" Text="Confirmar Senha:"></asp:Label>
                <asp:TextBox ID="txtSenhaConfirmar" runat="server" placeholder="Digite a senha novamente"></asp:TextBox>
            </div>
        </fieldset>
        <asp:Button ID="btnAtualizar" runat="server" Text="Atualizar Mapa" 
            onclick="btnAtualizar_Click" />
        <div id="map_canvas">
            <script type="text/javascript">
                initialize();
            </script>
        </div>
        <fieldset class="infLeft">            
            <legend>Informações Gerais</legend>
            <div>
                <asp:Label ID="lblNome" runat="server" Text="Nome:"></asp:Label>
                <asp:TextBox ID="txtNome" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblCNPJ" runat="server" Text="CNPJ:"></asp:Label>
                <asp:TextBox ID="txtCNPJ" runat="server"></asp:TextBox>
                <br />
                <asp:ListBox ID="ltbEscola" runat="server" SelectionMode="Multiple">
                    <asp:ListItem>Ensino Fundamental I  </asp:ListItem>
                    <asp:ListItem>Ensino Fundamental II </asp:ListItem>
                    <asp:ListItem>Ensino Médio          </asp:ListItem>
                    <asp:ListItem>Ensino Superior       </asp:ListItem>
                </asp:ListBox>
            </div>
        </fieldset>
        <fieldset class="infLeft">
            <legend>Informações de Endereço</legend>
            <div>
                <asp:Label ID="lblCEP" class="lblCenterPage" runat="server" Text="CEP:"></asp:Label>
                <asp:TextBox ID="txtCEP" runat="server" class="txtCEP"></asp:TextBox>

                <asp:ImageButton ID="ImageButton1" runat="server" 
                    ImageUrl="~/Util/Imagens/icon_lupa.png" OnClick="btnBuscarCEP_Click" />
                <br />

                <asp:Label ID="lblEstado" runat="server" Text="Estado:"></asp:Label>
                <asp:TextBox ID="txtEstado" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblCidade" runat="server" Text="Cidade:"></asp:Label>
                <asp:TextBox ID="txtCidade" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblBairro" runat="server" Text="Bairro:"></asp:Label>
                <asp:TextBox ID="txtBairro" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblLogradouro" runat="server" Text="Logradouro:"></asp:Label>
                <asp:TextBox ID="txtLogradouro" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblNumero" runat="server" Text="Número:"></asp:Label>
                <asp:TextBox ID="txtNumero" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblComplemento" runat="server" Text="Complemento:"></asp:Label>
                <asp:TextBox ID="txtComplemento" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblLontitude" runat="server" Text="Longitude"></asp:Label>
                <asp:TextBox ID="txtLongitude" runat="server"></asp:TextBox>
                <br />
                <asp:Label ID="lblLatitude" runat="server" Text="Latitude"></asp:Label>
                <asp:TextBox ID="txtLatitude" runat="server"></asp:TextBox>
            </div>
        </fieldset>
        <asp:Button ID="btnSalvar" class="btnSalvar" runat="server" Text="Salvar" 
            onclick="btnSalvar_Click" />
    </fieldset>
     <asp:Panel id="pnlTabs" runat="server" Visible="false">
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1"><span>Contato</span></a></li>
        </ul>
        <div id="tabs-1">
        <fieldset class="infLeft">
        <legend>
        Adicionar Contato</legend>
            <asp:Label ID="lblDDD" runat="server" Text="DDD:"></asp:Label>
            <asp:TextBox ID="txtDDD" runat="server" Width="30px"></asp:TextBox>
            <asp:Label ID="lblNumeroContato" runat="server" Text="Numero"></asp:Label>
            <asp:TextBox ID="txtNumeroContato" runat="server"></asp:TextBox>
            <asp:Label ID="lblRamal" runat="server" Text="Ramal"></asp:Label>
            <asp:TextBox ID="txtRamal" runat="server" Width="30px"></asp:TextBox>
            <asp:Button ID="btnSalvarTelefone" Text="Salvar Telefone" runat="server" OnClick="btnSalvarTelefone_Click" />
            </fieldset>
            <asp:GridView ID="gridContato" runat="server" OnRowDeleting="ExcluirTelefone" Width="444px" AutoGenerateColumns="false">
                <Columns>
                    <asp:TemplateField HeaderText="DDD">
                        <ItemTemplate>
                            <%# Eval("DDD") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Telefone">
                        <ItemTemplate>
                            <%# Eval("Telefone") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Ramal">
                        <ItemTemplate>
                            <%# Eval("Ramal") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HiddenField ID="hdfidTelefone" runat="server" Value='<%# ("idContato") %>' />
                            <asp:LinkButton ID="lkbExcluirGrid" runat="server" CommandName="Delete" Text="Excluir"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
    </div>
    </asp:Panel>

</asp:Content>
